{include file="base/header"}
      <style>
        .layui-form-label{
            width: 110px;
        }
        .layui-input-block{
            margin-left: 140px;
        }
        .userp_1{
            position: relative;
        }
        .userp_2{
            position:absolute;
            right:20px;
            top:8px;
            font-weight: bold;
        }
      </style>
        <div class="layui-card"></div>
        <div class="layui-card ">
            <div class="layui-card">
                <div class="layui-card-header">{$msgtitle}</div>
            </div>
          
            <div class="layui-card-body">
                <form class="layui-form " id="formId">
                    {switch name="$Request.get.id"} 
                    {case value="11"}
                    <div class="layui-col-md6"> 
                      <div class="layui-form-item">
                        <label class="layui-form-label">检测金额</label>
                        <div class="layui-input-block userp_1">
                          <input type="text" name="price" value="{$msg.price|default=''}" lay-verify="required|validateMoney" required   placeholder="请输入检测金额" autocomplete="off" class="layui-input">
                          <span class="userp_2">元</span>
                          </div>
                      </div>
                      </div>
                    {/case}
                    {case value="1"}
                    <div class="layui-col-md6"> 
                    <div class="layui-form-item">
                      <label class="layui-form-label">备案信息</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="beianmsg" value="{$msg.beianmsg|default=''}" required   placeholder="请输入备案信息" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">元</span> -->
                        </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">备案号</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="beian_sn" value="{$msg.beian_sn|default=''}" required   placeholder="请输入备案号" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">L</span> -->
                    </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">版权归属</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="banquan_msg" value="{$msg.banquan_msg|default=''}" required   placeholder="请输入版权归属" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">客服电话</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="kf_tel" value="{$msg.kf_tel|default=''}" required   placeholder="请输入客服电话" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    
                    <div class="layui-form-item">
                      <label class="layui-form-label">短信账号</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="sms_user" value="{$msg.sms_user|default=''}" required   placeholder="请输入短信接口账号" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    <div class="layui-form-item">
                      <label class="layui-form-label">短信密码</label>
                      <div class="layui-input-block userp_1">
                        <input type="text" name="sms_pwd" value="{$msg.sms_pwd|default=''}" required   placeholder="请输入短信接口密码" autocomplete="off" class="layui-input">
                        <!-- <span class="userp_2">年</span> -->
                    </div>
                    </div>
                    
                    
                    
                  </div>
                      {/case} 
                      {case value="2"} 
                      {volist name="$_sht12" id="vo"}
                      <div class="layui-col-md4">
                      {$vo}
                      <hr>
                        <div class="layui-form-item ">
                            <label class="layui-form-label">财富估值</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="sgt[{$key}][cfgz]" value="{if !empty($msg['sgt'][$key]['cfgz'])}{$msg['sgt'][$key]['cfgz']}{/if}" required   placeholder="请输入财富估值" autocomplete="off" class="layui-input">
                            <!-- <span class="userp_2">元</span> -->
                        </div>
                        </div>
                        <div class="layui-form-item ">
                          <label class="layui-form-label">年龄特质</label>
                          <div class="layui-input-block userp_1">
                          <input type="text" name="sgt[{$key}][nltz]" value="{if !empty($msg['sgt'][$key]['nltz'])}{$msg['sgt'][$key]['nltz']}{/if}" required   placeholder="请输入年龄特质" autocomplete="off" class="layui-input">
                          <!-- <span class="userp_2">元</span> -->
                      </div>
                      </div>
                      <div class="layui-form-item ">
                            <label class="layui-form-label">交友类型</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="sgt[{$key}][jylx]" value="{if !empty($msg['sgt'][$key]['jylx'])}{$msg['sgt'][$key]['jylx']}{/if}" required   placeholder="请输入交友类型" autocomplete="off" class="layui-input">
                            <!-- <span class="userp_2">元</span> -->
                        </div>
                      </div>
                      <div class="layui-form-item ">
                            <label class="layui-form-label">交友优势</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="sgt[{$key}][jyys]" value="{if !empty($msg['sgt'][$key]['jyys'])}{$msg['sgt'][$key]['jyys']}{/if}" required   placeholder="请输入交友优势" autocomplete="off" class="layui-input">
                            <!-- <span class="userp_2">元</span> -->
                        </div>
                      </div>
                    </div>
                      {/volist}
                   
                      {/case}
                      {case value="5"} 
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级A</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="A" value="{$msg.A|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级B</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="B" value="{$msg.B|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级C</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="C" value="{$msg.C|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级D</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="D" value="{$msg.D|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">等级E</label>
                            <div class="layui-input-block userp_1">
                            <input type="text" name="F" value="{$msg.F|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                            <span class="userp_2">月份</span>
                        </div>
                        </div>

                  
               
                      {/case}
                      {case value="6"}
                      <div class="layui-form-item">
                        <label class="layui-form-label">17%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b17" value="{$msg.b17|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">36%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b36" value="{$msg.b36|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">59%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b59" value="{$msg.b59|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">74%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b74" value="{$msg.b74|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">87%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b87" value="{$msg.b87|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                      {/case}
                      {case value="7"}
                      <div class="layui-form-item">
                        <label class="layui-form-label">22%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b22" value="{$msg.b22|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">38%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b38" value="{$msg.b38|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">46%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b46" value="{$msg.b46|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">63%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b63" value="{$msg.b63|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">82%</label>
                        <div class="layui-input-block userp_1">
                        <input type="text" name="b82" value="{$msg.b82|default=''}" required  placeholder="请输入月份" autocomplete="off" class="layui-input">
                        <span class="userp_2">月份</span>
                    </div>
                    </div>
                      {/case}
                      {case value="10"}
                      <div class="layui-form-item">
                        <label class="layui-form-label">多元特征</label>
                        <div class="layui-input-block userp_1">
                          <div class="layui-btn-container tag" style="padding-top: 5px;" id="tabId1" lay-filter="tabId1" lay-allowclose="true" lay-newTag="true">
                            {php}$msg['data']=json_decode($msg['data'],true);{/php}
                            {volist name="msg.data" id="vo"}  
                              <button lay-id="{$i}" type="button" class="tag-item">{$vo}</button>
                            {/volist}
                          </div>
                        </div>
                        <input type="hidden" name="data" id="tabId1_input" value="">
                    </div>
                    {/case}
                    {case value="12"}
                    <div class="layui-form-item">
                      <label class="layui-form-label">反馈类型</label>
                      <div class="layui-input-block userp_1">
                        <div class="layui-btn-container tag" style="padding-top: 5px;" id="tabId1" lay-filter="tabId1" lay-allowclose="true" lay-newTag="true">
                          {php}$msg['data']=json_decode($msg['data'],true);{/php}
                          {volist name="msg.data" id="vo"}  
                            <button lay-id="{$i}" type="button" class="tag-item">{$vo}</button>
                          {/volist}
                        </div>
                      </div>
                      <input type="hidden" name="data" id="tabId1_input" value="">
                  </div>

                      {/case}
                      {case value="13"}
                      <div class="layui-form-item">

                        <label class="layui-form-label">通用小知识</label>
  
                        <div class="layui-input-block ">
  
                          <textarea id="tucontent1" type="text/plain" style="height: 200px;"
                          name="tucontent1" >{$msg.tucontent1|default=''}</textarea>
                        </div>
                      </div>
                      <div class="layui-form-item">

                        <label class="layui-form-label">申请小技巧</label>
  
                        <div class="layui-input-block ">
  
                          <textarea id="tucontent2" type="text/plain" style="height: 200px;"
                          name="tucontent2" >{$msg.tucontent2|default=''}</textarea>
                        </div>
                      </div>
                      {/case}
                      {case value="14"}
                        <!---->
                        <div class="layui-form-item">

                        <label class="layui-form-label">百度统计js代码</label>
  
                        <div class="layui-input-block">
                          <textarea id="tucontent10" class="layui-textarea"
                          name="tucontent10" style="height:500px;">{$msg.tucontent10}</textarea>
                        </div>
                      </div>
                      {/case}
                    {/switch}
                    <div class="layui-form-item">
                      <div class="layui-input-block">
                        <button class="pear-btn pear-btn-primary pear-btn-sm" lay-submit lay-filter="form-save"><i class="layui-icon layui-icon-ok"></i>确认信息</button>
                        <button type="reset" class="pear-btn  pear-btn-sm"><i class="layui-icon layui-icon-refresh"></i>重置</button>
                      </div>
                    </div>
                  </form>
            </div>
        </div>
        <script type="text/javascript" charset="utf-8" src="/static/editor/ueditor.config.js"></script>
        <script type="text/javascript" charset="utf-8" src="/static/editor/ueditor.all.js"> </script>
        <script type="text/javascript" charset="utf-8" src="/static/editor/lang/zh-cn/zh-cn.js"></script>
        <script>
            $(function(){
                  var ue = UE.getEditor('tucontent1',{
				                      autoFloatEnabled: false,//是否保持toolbar位置不懂
				                      toolbars:[[ 'Source', 'Undo', 'Redo','bold','test','underline','fontborder','strikethrough','superscript','subscript',

                            'removeformat', 'formatmatch' ,'autotypeset', 'blockquote', 'pasteplain', 'forecolor', 'backcolor',

                            'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']]
			          });
                      var ue = UE.getEditor('tucontent2',{
				                      autoFloatEnabled: false,//是否保持toolbar位置不懂
				                      toolbars:[[ 'Source', 'Undo', 'Redo','bold','test','underline','fontborder','strikethrough','superscript','subscript',

                            'removeformat', 'formatmatch' ,'autotypeset', 'blockquote', 'pasteplain', 'forecolor', 'backcolor',

                            'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']]
			          });
  
              });
			layui.use(['table', 'form', 'jquery','tag'], function() {
				let table = layui.table;
				let form = layui.form;
        let tag = layui.tag; 
				let $ = layui.jquery;

        
        
                　//自定义表单验证（金额）
                form.verify({
                    validateMoney: [
                    /^\d+(\.{0,1}\d+){0,1}$/ //正则表达式
                    ,'请输入正确的数字' //提示信息
                    ]
                });
                form.on('submit(form-save)', function (data) {
                    var data = $("#formId");
                    if("{$Request.get.id}"==10 || "{$Request.get.id}"==12){
                        //tabId1 tag-item  tabId1_input
                        var jsonObj=[];
                        $("#tabId1").find(".tag-item").each(function(){
                          var str=$(this).text();
                          //console.log($(this).find(".tag-close").text());
                          str=str.slice(0,-1);
                  
                          jsonObj.push(str);
                        });
                         var jsonStr=JSON.stringify(jsonObj);
                        $("#tabId1_input").val(jsonStr);
                    }
                 
                    postDatai("{:url('basic/setUserconfig')}?id={$Request.get.id}", data).then(function (res) {
                        if (res.code == 200) {
                            layer.msg(res.message, {
                                icon: 1,
                                time: 1000
                            }, function () {
                              parent.layui.admin.refreshThis()
                               return; 
                            });
                        } else {
                            layer.msg(res.message, {
                                icon: 2,
                                time: 1000
                            });
                        }
                    });
                    return false;
                });
           

			})
		</script>
{include file="base/footer"}